package com.pavelkaminsky;

import com.mongodb.DBObject;

import java.util.List;

/**
 * @Author: Pavel Kaminsky
 * @Site : www.pavel-kaminsky.com
 * @Date: 08/10/11
 */
public class Main {

    public static void main(String[] args) {

        FBClient facebook = new FBClient();
        MongoDB mongoDB = new MongoDB();

        mongoDB.storeFriends(facebook.getMyFriends());
        List<DBObject> res = mongoDB.findFriendsByYear("1984");

        System.out.println("Born in 1984");

        for(DBObject friend : res)
            System.out.println(friend);

        res = mongoDB.findTelAvivFriends();
        System.out.println("\nFriends From Tel Aviv");

        for(DBObject friend : res)
            System.out.println(friend);

    }


}
